<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
  <title>Document</title>
</head>
<style>
  *{
    margin: 0;
    padding: 0;
  }
  .foot{
    width: 100%;
    height: 200px;
    position: fixed;
    bottom: 0;
    background-color: red;
  }
  /* 方案二 */
  /* .content{
    height: calc(100vh - 50px);
  }
  .footer{
    height: 50px;
    background-color: red;
  } */
  /* 方案三 */
  .wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: auto;
    background-color: #fff;
    
}
.content {
  height: calc(100vh - 50px);

    flex: 1;
    background-color: #000;
}
.footer {
    flex: 0;
    height: 50px;

    background-color: red;

}
</style>
<body>
  <!-- [html] 如何让元素固定在页面底部？有哪些比较好的实践？ -->
  <!-- 方案一 -->
  <!-- <div class="foot"></div> -->
  <!-- 方案二 -->
    <div class="wrapper">
      <div class="content"><!-- 页面主体内容区域 --></div>
      <div class="footer"><!-- 需要做到 Sticky Footer 效果的页脚 --></div>
  </div>
</body>
</html>

